package com.heqiang.spring;

/**
 * 学习链接
 * https://mp.weixin.qq.com/s/fiWX6abSCiUKHAUa-HKg4A
 */
public class TestMain {


    public static void main(String[] args) {
        //1,创建bean工厂
        BeanFactory beanFactory = new BeanFactory();
        //2，注册bean
        BeanDefinition beanDefinition = new BeanDefinition(new Service());
        beanFactory.registerDefinitionBean("service",beanDefinition);
        //3，获取bean
        Service service = (Service) beanFactory.getBean("service");

        service.getHelloWorld();

    }
}
